#include"SeqStack.h"
int main() 
{
    SqStack q;
    SqStack * S=&q;
    int i, n, e;
    printf("Creat a NULL Stack :\n");

    InitStack(S);

    printf("input the length of the Stack :\n");
    scanf("%d", &n);

    for (i = 1; i <= n; i++) 
    {
        scanf("%d", &e);
        PushStack(S, e);
    }
    printf("Is the stack NULL?\n");

    if (EmptyStack(S)) 
    {
        printf("Yes!\n");
    }
    else 
    {
        printf("No!\n");
    }

    printf("The length of stack is %d.\n", LengthStack(S));
    printf("The stack is :\n");
    StackTraverse(S);
    e = GetTopStack(S, &e);
    printf("The top data is %d.\n", e);
    printf("input the data to the stack :\n");
    scanf("%d", &e);
    PushStack(S, e);
    printf("The new stack is :\n");
    StackTraverse(S);
    printf("Delete the top data : ");
    e = PopStack(S, &e);
    printf("%d\n", e);
    printf("The new stack is :\n");
    StackTraverse(S);
    printf("Destroy the stack :\n");
    DestroyStack(S);
    StackTraverse(S);
    return 0;
}
